<?php
/**
 * Application level View Helper
 *
 * This file is application-wide helper file. You can put all
 * application-wide helper-related methods here.
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.cake
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
App::import('View', 'Helper', false);

/**
 * This is a placeholder class.
 * Create the same file in app/app_helper.php
 *
 * Add your application-wide methods in the class below, your helpers
 * will inherit them.
 *
 * @package       cake
 * @subpackage    cake.cake
 */
class AppHelper extends Helper {
	/*function url($url = NULL, $full = false) {
		
		if(isset($this->params['tab'])) {
			$url['pass']['tab']=$this->params['tab'];
		}
		return parent::url($url, $full); 

	}
	
	
	public function url($url = NULL, $full = FALSE) {
	  if(isset($this->params['tab'])) {
		$url['tab'] = $this->params['tab'];
		$url['controller'] = $this->params['controller'];
		$url['action'] = $this->params['action'];
	  }
	 
	  return parent::url($url, $full);
	}
	
	
	function url($url = null, $full = false) {
		pr($url);
		if (is_array($url)) {

			$url=explode('/',$this->params['url']['url']);

			if($url[0]=='browse') {
				$url['tab'] = 'browse1';
			}
		}

		$url2 = parent::url($url, $full);
		pr($url2);
		exit;
	} */
	
	
	
}
